package com.example.demospring.controller.assistant;

import com.example.demospring.service.assistant.ConsultingAuditService;
import com.example.demospring.dto.assistant.AppointmentReviewReqDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import com.example.demospring.entity.ConsultingAppointment;

@RestController
@RequestMapping("/assistant/consulting-audit")
public class ConsultingAuditController {
    @Autowired ConsultingAuditService service;

    @GetMapping("/pending")
    public List<ConsultingAppointment> pending() {
        return service.listPending();
    }

    @PostMapping("/review/{appointmentId}")
    public void review(@PathVariable Integer appointmentId, @RequestBody AppointmentReviewReqDto req) {
        service.review(appointmentId, req.getAssistantId(), req.getResult(), req.getNote());
    }
}